
 package com.ami.kvm.jviewer.gui;
 
 import com.ami.kvm.jviewer.Debug;
 import java.util.Date;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 public class SystemTimeMonitor
   extends Thread
 {
   private static boolean timeChanged = false;
   private Date currentTime = null;
   private Date pastTime = null;
   private final long SLEEP_TIME = 5000L;
   
   private final long SLEEP_TIME_SHIFT = 1000L;
   
   public void run() {
     for (;;) { this.currentTime = new Date(System.currentTimeMillis());
       if (this.pastTime != null) {
         long l = this.currentTime.getTime() - this.pastTime.getTime();
         
 
 
         if ((l <= 4000L) || (l >= 6000L))
         {
           timeChanged = true;
           
           JViewerApp.getInstance().setRedirectionStatus(JViewerApp.REDIR_STOPPED);
           
           JViewerApp.getInstance().getMainWindow().windowClosed();
         }
       }
       try {
         Thread.sleep(5000L);
       }
       catch (InterruptedException localInterruptedException) {
         Debug.out.println("Thread.Sleep interrupted\n" + localInterruptedException);
       }
       this.pastTime = this.currentTime;
     }
   }
   
 
   public static boolean isTimeChanged()
   {
     return timeChanged;
   }
 }


/* Location:              D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\kvm\jviewer\gui\SystemTimeMonitor.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */